package top.kaoshanji.p1ch03b;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/4/23 9:41
 */
@Configuration
public class MagicConfig {

    /**
     * 代码清单-p1ch03b-76页a：条件化地配置bean
     * @return MagicBean
     */
    @Bean
    @Conditional(MagicExistsCondition.class)
    public MagicBean magicBean() {
        return new MagicBean();
    }

}
